let fs = require('fs')
/* fs.readFile('qweqe','utf-8',function(err,data){
	if(err){
		console.log(err)
	}
	else{
		console.log(data)
	}
})

fs.writeFile('qweqe','aassadsd',function(err){
	if(err){
		console.log(err)
	}
}) */

/* fs.stat('qweqe',function(err,stat){
	if(err){
		console.log(err)
	}
	else{
		console.log(stat.isFile())
		console.log(stat.isDirectory())
		if(stat.isFile()){
			console.log(stat.size)
			console.log(stat.birthtime)
			console.log(stat.mtime)
		}
	}
}) */
let rs = fs.createReadStream('1','utf-8');

let ws = fs.createWriteStream('qweqe','utf-8')
rs.pipe(ws)//把读取的文件流导向写文件流，实现复制效果
//ws.write(Buffer.from('2112\n','utf-8'))
//ws.write(Buffer.from('778\n','utf-8'))
